﻿/*
 * Created by SharpDevelop.
 * User: Zoila
 * Date: 10/11/2011
 * Time: 05:00 a.m.
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Drawing;
using System.Windows.Forms;
using Business_Entity;
using Business_Logic;

namespace PetSoft.GUI.Configuracion
{
	
	/// <summary>
	/// Description of GUINuevaCaja.
	/// </summary>
	public partial class GUINuevaCaja : Form
	{
		BLCaja blCaja = new BLCaja();
		BETienda tienda;
		public GUINuevaCaja(BETienda tienda)
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
			this.tienda=tienda;
			this.tiendaTB.Text=tienda.ToString();
			//this.cajaTB.Text="Ingrese Nombre";
			this.tiendaTB.KeyPress+=new KeyPressEventHandler(Utils.NoCaracteresRarosTB);
			this.tiendaTB.MaxLength=30;
		}
		
		
		void AceptarBTNClick(object sender, EventArgs e)
		{
			if (cajaTB.Text!=""){
				blCaja.nuevaCaja(tienda,this.cajaTB.Text);
				this.Close();
			}
			else {
				MessageBox.Show("Debe colocar el nombre de la Caja","Info");
			}
		}
	}
}
